<template>
  <div>初始值：{{ message3 }}</div>
  <MyChildren :people="message3" @changePeople="changeName"></MyChildren>
</template>

<script setup>
import { ref } from 'vue'
import MyChildren from './SonComponent.vue'
const message3 = ref({ name: '韩哈哈', age: 12 })
//子改父
const changeName = (value) => {
  console.log(value, 'newPeople')
  message3.value = value
}
</script>
<style lang="scss" scoped></style>
